import java.util.Random;

/**
 * @author Stephen Dolman, 200907049
 *
 * 29.10.12 - Wrote this class to simulate die. After all, 10k is a dice game!
 * 			  I figure you can only do 2 things to a die - roll it, and read the number off of the roll.
 * 			  The methods written in this class thus reflect these properties entirely.
 */

public class Dice{
	
	int diceRoll;
	Random random = new Random();	//Used to generate random numbers.
	
	public Dice(){
	}

	public void roll(){
		diceRoll = (random.nextInt(6))+1;
		//nextInt(6) generates a number from 0 to 5, so we need to add the 1 to make the range 1-6; like a real die.
	}
	
	public int getRoll(){
		return diceRoll;
	}
		
}
